import React from 'react'
import { $pre } from "../../../../http/http";
import "./Newbie.less"
import {Link} from "react-router-dom"



export default function Newbie(props) {
    let { newarr } = props;
    return (
        <div className='newbie'>
            <h1>新人专享</h1>
            <ul>
                {
                    newarr.map((item) => {
                        return (
                            <Link to={`/goods/${item.id}/1`} className="card" key={item.id}>
                            <li key={item.id}
                        >
                            <img src={$pre + item.img} alt={item.goodsname} />
                            <h2>商品名称：{item.goodsname}</h2>
                            <p>原价：{item.market_price}</p>
                            <p>现价：{item.price}</p>
                        </li>
                        </Link>
                        )
                    })
                }

            </ul>
        </div>
    )

}
